package edu.nf.work06.service;

import edu.nf.work06.entity.User;
import edu.nf.work06.mapper.UserMapper;
import edu.nf.work06.util.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author CSY
 * @date 2025 - 04 - 24
 */
public class UserService {
    public List<User> listUsers(){
        try(SqlSession session = MybatisUtils.getSqlSession()){
            return session.getMapper(UserMapper.class).listUsers();
        }
    }
}
